﻿import com.neshumah.gallery.Gallery
import com.Higher.*


/**
 * Control de la galeria
 * 
 * @author
 * @version
 **/
class com.Higher.Galeria extends com.neshumah.gallery.Gallery  {
	
	var _xmldatos:XML;
	
	function Galeria(s){
		super(s);
	}
	
	private function complete(p_evtObj:Object):Void {
		// Parcear XML y crear objetos
		_xmldatos=p_evtObj.target;
		
		var total=_xmldatos.firstChild.childNodes.length;
		trace("total: "+total);
		var i=0;
		for(i=0; i < total; i++){
			var ob=_xmldatos.firstChild.childNodes[i].childNodes;
		
			addE( new Image(ob[0].firstChild.nodeValue , ob[1].firstChild.nodeValue ,ob[2].firstChild.nodeValue, ob[3].firstChild.nodeValue) );
		}
		
		dispatchEvent({target:this,type:"gOnComplete",status:p_evtObj.success});
	}
	
}